package com.jishuo.nontax.bean.vo;

import com.jishuo.base.util.StringObject;
import com.jishuo.nontax.bean.bank.PunishLatefee;
import com.jishuo.nontax.bean.message.SetLategee;
import com.jishuo.nontax.bean.message.SetPunishinfo;
import com.jishuo.nontax.bean.message.SetPunishinfoDetail;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;


/**
 * @author hlp
 * @email 1459875748@qq.com
 * @date 2023-02-02 10:13:13
 */
@Data
public class PunishInfoVO implements Serializable {
    private static final long serialVersionUID = 1L;

    //流水号
    private Long punishinfoid;
    //处罚决定书号
    private String punishbillnum;
    //区划ID
    private Long cantonid;
    //单位ID
    private Long unitid;
    //票据年度
    private String billyear;
    //罚没种类ID
    private Long punishid;
    //政策文件
    private String policyfiles;
    //文号
    private String policynumber;
    //主体机关代码
    private String suborg;
    //罚缴分离代码
    private String childorg;
    //当事人/单位
    private String penaltyobjects;
    //地址
    private String address;
    //违法行为
    private String illegal;
    //政策规定
    private String regulations;
    //法律依据
    private String punishbasis;
    //罚没决定
    private String punishdecision;
    //罚没金额
    private BigDecimal punishamt;
    //滞纳金
    private BigDecimal latefee;
    //处罚日期
    private String punishdate;
    //代录日期
    private String recorddate;
    //是否减免滞纳金
    private Integer isremission;
    //收款银行ID
    private Long bankid;
    //
    private Integer billstate;
    //
    private Integer issend;
    //
    private Long messageid;
    //打印时间
    private String writedate;
    //发送时间
    private String sendtime;
    //付款日期  不存数据库
    private String paybankdt;



    //页面
    private String cantoncode;
    private String cantonname;
    private String unitcode;
    private String unitname;
    private String accountname;
    private String accountcode;

    private  String  bankname;

    //返回  PunishLatefee 类
    public PunishLatefee getLatefees() {
        PunishLatefee latefee = new PunishLatefee();
        latefee.setPunishbillnum(this.punishbillnum);
        latefee.setUnitid(StringObject.objectString(this.unitid));
        latefee.setBillyear(this.billyear);
        latefee.setLatefee(StringObject.objectString(this.latefee));
        latefee.setBillstate(StringObject.objectString(this.billstate));
        return latefee;
    }


    public PunishInfoVO() {
    }

    //从SetPunishInfo中取值
    public PunishInfoVO(SetPunishinfo info) {
        this.cantonid = Long.parseLong(info.getCantonid());
        this.policyfiles = info.getPolicyfiles();
        this.policynumber = info.getPolicynumber();
        this.suborg = info.getSuborg();
        this.childorg = info.getChildorg();
        this.penaltyobjects = info.getPenaltyobjects();
        this.address = info.getAddress();
        this.illegal = info.getIllegal();
        this.regulations = info.getRegulations();
        this.punishbasis = info.getPunishbasis();
        this.punishdecision = info.getPunishdecision();
        this.punishamt = new BigDecimal(info.getPunishamt());
        this.latefee = new BigDecimal(info.getLatefee());
        this.punishdate = info.getPunishdate();
        this.recorddate = info.getRecorddate();
        this.isremission = Integer.parseInt(info.getIsremission());
        this.bankid = Long.parseLong(info.getBankid());
        this.billyear = info.getBillyear();
        this.unitid = Long.parseLong(info.getUnitid());
        this.punishbillnum = info.getPunishbillnum();
    }

    //从Setlategee中取值
    public PunishInfoVO(SetLategee lategee) {
        this.punishbillnum = lategee.getPunishbillnum();
        this.unitid = Long.parseLong(lategee.getUnitid());
        this.billyear = lategee.getBillyear();
        this.latefee = new BigDecimal(lategee.getLatefee());
    }

}
